﻿using Loki.Data;

namespace Luna.Data
{
    /// <summary>
    /// Interface for datamanagers.
    /// </summary>
    public interface IDatabaseManager
    {
        /// <summary>
        /// Gets or sets the current database connector.
        /// </summary>
        /// <value>
        /// The current database connector.
        /// </value>
        IDatabaseAdapter Current { get; set; }

        /// <summary>
        /// Creates a new database with the specified name.
        /// </summary>
        /// <param name="databaseName">Name of the database.</param>
        void Create(string databaseName);

        /// <summary>
        /// Opens the specified database name.
        /// </summary>
        /// <param name="databaseName">Name of the  database.</param>
        void Open(string databaseName);

        /// <summary>
        /// Saves the current database with the specified name.
        /// </summary>
        /// <param name="databaseName">Name of the database.</param>
        void SaveAs(string databaseName);

        /// <summary>
        /// Disconnect the current database.
        /// </summary>
        void Disconnect();
    }
}